<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="z" uri="/zoo-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>用户列表</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0"> 
<link  type="text/css" rel="stylesheet" href="css/main.css"/>
	<style type="text/css">
<!--
body {
	margin: 40px;
}
.STYLE1 {font-size: 12px}
.STYLE4 {
	font-size: 12px;
	color: #1F4A65;
	font-weight: bold;
}

a:link {
	font-size: 12px;
	color: #06482a;
	text-decoration: none;

}
a:visited {
	font-size: 12px;
	color: #06482a;
	text-decoration: none;
}
a:hover {
	font-size: 12px;
	color: #FF0000;
	text-decoration: underline;
}
a:active {
	font-size: 12px;
	color: #FF0000;
	text-decoration: none;
}
.STYLE7 {font-size: 12}
.button{background: url("images/back.gif") no-repeat; font-size:12px; border: none; text-align: center; width: 50px;}
.disableButton{background: url("images/back.gif") no-repeat; font-size:12px; border: none; text-align: center; width: 50px;}
-->
</style>
<script type="text/javascript">
function del() {
	if (confirm("您确定要删除该记录吗？？")) {
		return true;
	} else {
		return false;
	}
}
var  highlightcolor='#eafcd5';
//此处clickcolor只能用win系统颜色代码才能成功,如果用#xxxxxx的代码就不行,还没搞清楚为什么:(
var  clickcolor='#51b2f6';
function  changeto(){
source=event.srcElement;
if  (source.tagName=="TR"||source.tagName=="TABLE")
return;
while(source.tagName!="TD")
source=source.parentElement;
source=source.parentElement;
cs  =  source.children;
//alert(cs.length);
if  (cs[1].style.backgroundColor!=highlightcolor&&source.id!="nc"&&cs[1].style.backgroundColor!=clickcolor)
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor=highlightcolor;
}
}

function  changeback(){
if  (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="nc")
return
if  (event.toElement!=source&&cs[1].style.backgroundColor!=clickcolor)
//source.style.backgroundColor=originalcolor
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor="";
}
}

function  clickto(){
source=event.srcElement;
if  (source.tagName=="TR"||source.tagName=="TABLE")
return;
while(source.tagName!="TD")
source=source.parentElement;
source=source.parentElement;
cs  =  source.children;
//alert(cs.length);
if  (cs[1].style.backgroundColor!=clickcolor&&source.id!="nc")
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor=clickcolor;
}
else
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor="";
}
}
function selectall(){
   var a = document.getElementsByName("check");
   if(a[0].checked==true){
	   for (var i=0; i<a.length; i++){
	      if(a[i].type == "checkbox"){
	       	  a[i].checked = false;
	       }
	   }
   }else{
	   for (var i=0; i<a.length; i++){
	      if(a[i].type == "checkbox"){
	      	  a[i].checked = true;
	       }
	   }
   }
}
</script> 

  </head>
  
  <body bgcolor="#BEDCF8" topmargin="0">
<div id="duoyu">
<img  src="image/123.jpg" width="900" height="86"/>
<table height="30">
<tr>
<td width="580"><a href="#">欢迎登录管理，当前时间为：</a></td>
<td><a href="#">管理首页|系统配置|风格管理|修改密码|退出登录</a></td>
</tr>
</table>

</div>
<div id="contect">
<div id="zuo">
<table bgcolor="#FFFFFF" width="230" height="500">
<tr><td><a href="#">用户管理</a></td></tr>
<tr><td><img  src="image/4.jpg"/></td></tr>
<tr><td><a href="#">商品管理</a></td></tr>
<tr><td><img  src="image/4.jpg"/></td></tr>
<tr><td><a href="#">系统管理</a></td></tr>
<tr><td><img   src="image/4.jpg"/></td></tr>
<tr><td><a href="#">新闻管理</a></td></tr>
<tr><td><img   src="image/4.jpg"/></td></tr>
<tr><td><a href="#">留言管理</a></td></tr>
<tr><td><img   src="image/4.jpg"/></td></tr>
<tr><td><a href="#">日志管理</a></td></tr>
<tr><td><img   src="image/4.jpg"/></td></tr>
<tr><td><a href="#">订单管理</a></td></tr>
<tr><td><img   src="image/4.jpg"/></td></tr>
</table>
</div>
<div id="you">
 <div style="text-align: center; font-size: 14px;">
 <form action="user_search.do" method="post" name="form1">
用户名：<input type="text" name="user.u_username" value='<s:property value="user.u_username" />' />&nbsp;&nbsp;
<input type="submit" value="搜索"/>
</form> 
 </div>
  <table  width="580"  height="460">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td> <p>&nbsp;&nbsp;当前位置：&nbsp;<a href="console/admin_main.html" style="font-size:14px;">首页</a>>>&nbsp;<a href="#" style="font-size:14px;">用户列表</a></p></td></tr> 
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="9" >&nbsp;</td>
        <td ><table width="99%" border="0" align="center" bgcolor="#FFFood" cellpadding="0" cellspacing="1"  onmouseover="changeto()"  onmouseout="changeback()">
          <tr>
            <td width="10%" height="60"  class="STYLE1"><div align="center" class="STYLE2 STYLE1" style="color:red">用户名</div></td>
            <td width="10%" height="60"  class="STYLE1"><div align="center" class="STYLE2 STYLE1" style="color:red">密码</div></td>
            <td width="18%" height="60"  class="STYLE1"><div align="center" class="STYLE2 STYLE1" style="color:red">邮箱</div></td>
            <td width="15%" height="60"  class="STYLE1"><div align="center" class="STYLE2 STYLE1" style="color:red">注册时间</div></td>
            <td width="15%" height="60"  class="STYLE1"><div align="center" class="STYLE2 STYLE1" style="color:red">等级</div></td>
            <td width="9%" height="60"  class="STYLE1"><div align="center" class="STYLE2" style="color:red">查看</div></td>
            <td width="9%" height="60"  class="STYLE1"><div align="center" class="STYLE2" style="color:red">修改</div></td>
            <td width="15%" height="60"  class="STYLE1"><div align="center" class="STYLE2" style="color:red">删除</div></td>
          </tr>
          <s:iterator value="users">
          <tr>
            <td height="60" bgcolor="#FFFFFF" class="STYLE2"><div align="center" class="STYLE2 STYLE1"><s:property value="u_username" /></div></td>
            <td height="60" bgcolor="#FFFFFF" class="STYLE2"><div align="center" class="STYLE2 STYLE1"><s:property value="u_password" /></div></td>
            <td height="60" bgcolor="#FFFFFF"><div align="center" class="STYLE2 STYLE1"><s:property value="u_email" /></div></td>
            <td height="60" bgcolor="#FFFFFF"><div align="center" class="STYLE2 STYLE1"><s:date name="u_addtime" format="yyyy-MM-dd" /></div></td>
            <td height="60" bgcolor="#FFFFFF"><div align="center" class="STYLE2 STYLE1"><s:property value="u_level" /></div></td>
            <td height="60" bgcolor="#FFFFFF"><div align="center" ><a  href="user_view.do?user.id=${id }" style="color:blue;">查看</a></div></td>
            <td height="60" bgcolor="#FFFFFF"><div align="center"><a href="user_editUI.do?user.id=${id }" style="color:blue;">修改</a></div></td>
            <td height="60" bgcolor="#FFFFFF"><div align="center"><a href="user_delete.do?user.id=${id }" onclick=" return del();" style="color:blue;">删除</a></div></td>
          </tr>
          </s:iterator>
        </table></td>
  </tr>
   <tr>
    		<td colspan="6" align="center">
    			${pagination}	
    		</td>
    	</tr>
		</table></td>
		</tr>
</table>
 </table> 
    
    <div style="width: 100%; text-align: center; margin-top: 10px;">
		<a href="console/index.jsp" style="color:blue; font-size:14;">返回首页</a>
 	</div> 
    </div>
 	</div>
 	</body>
</html>
